a = input('a=')
n = eval(input('n='))
item = 0
for i in range(1,n+1):
    item += int(a*i)
print(item)
